#!/usr/bin/env python 
# -*- coding: utf-8 -*-
# @Time       ：2022/1/25 16:17
# @Author     ：hwl
# @File       : 01.异常.py
# @Description：

# print(1/0)
# raise ZeroDivisionError("xxxxxxxxxxx")
# raise Exception("xxxxxxxxxxx")

# try:
#     1/0
# except ZeroDivisionError:
#     raise ValueError from None

# try:
#     1/0
# except Exception as e:
#     print(e)

try:
    1 / 0
except Exception as e:
    print(e)
else:
    print("ok")
finally:
    print("Cleaning up.")